<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddCommentsColumns extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('el_order_comment', function (Blueprint $table) {
            //
            $table->text('reply_content')->nullable();//回复内容
            $table->timestamp('reply_at')->nullable();//回复时间
            $table->integer('recommend')->unsigned()->default(0);  //推荐状态：0默认未推荐,1推荐
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('el_order_comment', function (Blueprint $table) {
            //
            $table->dropColumn(['reply_content', 'reply_at','recommend']);
        });
    }
}
